home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Drag.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  23.6 KB  |  626 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Drag.p
  3.  
  4.      Contains:    Drag and Drop Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Drag;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRAG__}
  28. {$SETC __DRAG__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DragIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __FILES__}
  41. {$I Files.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __APPLEEVENTS__}
  44. {$I AppleEvents.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __QUICKDRAW__}
  47. {$I Quickdraw.p}
  48. {$ENDC}
  49.  
  50.  
  51. {$PUSH}
  52. {$ALIGN MAC68K}
  53. {$LibExport+}
  54.  
  55. {
  56.   _________________________________________________________________________________________________________
  57.       
  58.    • DRAG MANAGER DATA TYPES
  59.   _________________________________________________________________________________________________________
  60. }
  61.  
  62.  
  63. TYPE
  64.     DragReference = ^LONGINT;
  65.     ItemReference                        = UInt32;
  66.     FlavorType                            = OSType;
  67. {
  68.   _________________________________________________________________________________________________________
  69.       
  70.    • DRAG ATTRIBUTES
  71.   _________________________________________________________________________________________________________
  72. }
  73.  
  74.     DragAttributes                        = OptionBits;
  75.  
  76. CONST
  77.     kDragHasLeftSenderWindow    = $00000001;                    {  drag has left the source window since TrackDrag }
  78.     kDragInsideSenderApplication = $00000002;                    {  drag is occurring within the sender application }
  79.     kDragInsideSenderWindow        = $00000004;                    {  drag is occurring within the sender window }
  80.  
  81. {
  82.   _________________________________________________________________________________________________________
  83.       
  84.    • DRAG IMAGE FLAGS
  85.   _________________________________________________________________________________________________________
  86. }
  87.  
  88.  
  89. TYPE
  90.     DragImageFlags                        = OptionBits;
  91.  
  92. CONST
  93.     kDragRegionAndImage            = $00000010;                    {  drag region and image }
  94.  
  95. {
  96.   _________________________________________________________________________________________________________
  97.       
  98.    • DRAG IMAGE TRANSLUCENCY LEVELS
  99.   _________________________________________________________________________________________________________
  100. }
  101.  
  102.  
  103. TYPE
  104.     DragImageTranslucency                = UInt32;
  105.  
  106. CONST
  107.     kDragStandardTranslucency    = 0;                            {  65% image translucency (standard) }
  108.     kDragDarkTranslucency        = 1;                            {  50% image translucency }
  109.     kDragDarkerTranslucency        = 2;                            {  25% image translucency }
  110.     kDragOpaqueTranslucency        = 3;                            {  0% image translucency (opaque) }
  111.  
  112. {
  113.   _________________________________________________________________________________________________________
  114.       
  115.    • DRAG DRAWING PROCEDURE MESSAGES
  116.   _________________________________________________________________________________________________________
  117. }
  118.  
  119.  
  120. TYPE
  121.     DragRegionMessage                    = SInt16;
  122.  
  123. CONST
  124.     kDragRegionBegin            = 1;                            {  initialize drawing }
  125.     kDragRegionDraw                = 2;                            {  draw drag feedback }
  126.     kDragRegionHide                = 3;                            {  hide drag feedback }
  127.     kDragRegionIdle                = 4;                            {  drag feedback idle time }
  128.     kDragRegionEnd                = 5;                            {  end of drawing }
  129.  
  130. {
  131.   _________________________________________________________________________________________________________
  132.       
  133.    • ZOOM ACCELERATION
  134.   _________________________________________________________________________________________________________
  135. }
  136.  
  137.  
  138. TYPE
  139.     ZoomAcceleration                    = SInt16;
  140.  
  141. CONST
  142.     kZoomNoAcceleration            = 0;                            {  use linear interpolation }
  143.     kZoomAccelerate                = 1;                            {  ramp up step size }
  144.     kZoomDecelerate                = 2;                            {  ramp down step size }
  145.  
  146. {
  147.   _________________________________________________________________________________________________________
  148.       
  149.    • FLAVOR FLAGS
  150.   _________________________________________________________________________________________________________
  151. }
  152.  
  153.  
  154. TYPE
  155.     FlavorFlags                            = OptionBits;
  156.  
  157. CONST
  158.     flavorSenderOnly            = $01;                            {  flavor is available to sender only }
  159.     flavorSenderTranslated        = $02;                            {  flavor is translated by sender }
  160.     flavorNotSaved                = $04;                            {  flavor should not be saved }
  161.     flavorSystemTranslated        = $0100;                        {  flavor is translated by system }
  162.  
  163. {
  164.   _________________________________________________________________________________________________________
  165.       
  166.    • SPECIAL FLAVORS
  167.   _________________________________________________________________________________________________________
  168. }
  169.  
  170.     flavorTypeHFS                = 'hfs ';                        {  flavor type for HFS data }
  171.     flavorTypePromiseHFS        = 'phfs';                        {  flavor type for promised HFS data }
  172.     flavorTypeDirectory            = 'diry';                        {  flavor type for AOCE directories }
  173.  
  174. {
  175.   _________________________________________________________________________________________________________
  176.       
  177.    • FLAVORS FOR FINDER 8.0 AND LATER
  178.   _________________________________________________________________________________________________________
  179. }
  180.  
  181.     kFlavorTypeClippingName        = 'clnm';                        {  name hint for clipping file (preferred over 'clfn') }
  182.     kFlavorTypeClippingFilename    = 'clfn';                        {  name for clipping file }
  183.     kFlavorTypeDragToTrashOnly    = 'fdtt';                        {  for apps that want to allow dragging private data to the trash }
  184.     kFlavorTypeFinderNoTrackingBehavior = 'fntb';                {  Finder completely ignores any drag containing this flavor }
  185.  
  186. {
  187.   _________________________________________________________________________________________________________
  188.       
  189.    • DRAG TRACKING HANDLER MESSAGES
  190.   _________________________________________________________________________________________________________
  191. }
  192.  
  193.  
  194. TYPE
  195.     DragTrackingMessage                    = SInt16;
  196.  
  197. CONST
  198.     kDragTrackingEnterHandler    = 1;                            {  drag has entered handler }
  199.     kDragTrackingEnterWindow    = 2;                            {  drag has entered window }
  200.     kDragTrackingInWindow        = 3;                            {  drag is moving within window }
  201.     kDragTrackingLeaveWindow    = 4;                            {  drag has exited window }
  202.     kDragTrackingLeaveHandler    = 5;                            {  drag has exited handler }
  203.  
  204. {
  205.   _________________________________________________________________________________________________________
  206.       
  207.    • HFS FLAVORS
  208.   _________________________________________________________________________________________________________
  209. }
  210.  
  211.  
  212. TYPE
  213.     HFSFlavorPtr = ^HFSFlavor;
  214.     HFSFlavor = RECORD
  215.         fileType:                OSType;                                    {  file type  }
  216.         fileCreator:            OSType;                                    {  file creator  }
  217.         fdFlags:                UInt16;                                    {  Finder flags  }
  218.         fileSpec:                FSSpec;                                    {  file system specification  }
  219.     END;
  220.  
  221.     PromiseHFSFlavorPtr = ^PromiseHFSFlavor;
  222.     PromiseHFSFlavor = RECORD
  223.         fileType:                OSType;                                    {  file type  }
  224.         fileCreator:            OSType;                                    {  file creator  }
  225.         fdFlags:                UInt16;                                    {  Finder flags  }
  226.         promisedFlavor:            FlavorType;                                {  promised flavor containing an FSSpec  }
  227.     END;
  228.  
  229. {
  230.   _________________________________________________________________________________________________________
  231.       
  232.    • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  233.   _________________________________________________________________________________________________________
  234. }
  235. {$IFC TYPED_FUNCTION_POINTERS}
  236.     DragTrackingHandlerProcPtr = FUNCTION(message: DragTrackingMessage; theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference): OSErr;
  237. {$ELSEC}
  238.     DragTrackingHandlerProcPtr = ProcPtr;
  239. {$ENDC}
  240.  
  241. {$IFC TYPED_FUNCTION_POINTERS}
  242.     DragReceiveHandlerProcPtr = FUNCTION(theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference): OSErr;
  243. {$ELSEC}
  244.     DragReceiveHandlerProcPtr = ProcPtr;
  245. {$ENDC}
  246.  
  247.     DragTrackingHandlerUPP = UniversalProcPtr;
  248.     DragReceiveHandlerUPP = UniversalProcPtr;
  249.  
  250. CONST
  251.     uppDragTrackingHandlerProcInfo = $00003FA0;
  252.     uppDragReceiveHandlerProcInfo = $00000FE0;
  253.  
  254. FUNCTION NewDragTrackingHandlerProc(userRoutine: DragTrackingHandlerProcPtr): DragTrackingHandlerUPP;
  255.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  256.     INLINE $2E9F;
  257.     {$ENDC}
  258.  
  259. FUNCTION NewDragReceiveHandlerProc(userRoutine: DragReceiveHandlerProcPtr): DragReceiveHandlerUPP;
  260.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  261.     INLINE $2E9F;
  262.     {$ENDC}
  263.  
  264. FUNCTION CallDragTrackingHandlerProc(message: DragTrackingMessage; theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragTrackingHandlerUPP): OSErr;
  265.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  266.     INLINE $205F, $4E90;
  267.     {$ENDC}
  268.  
  269. FUNCTION CallDragReceiveHandlerProc(theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragReceiveHandlerUPP): OSErr;
  270.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  271.     INLINE $205F, $4E90;
  272.     {$ENDC}
  273. {
  274.   _________________________________________________________________________________________________________
  275.       
  276.    • APPLICATION-DEFINED ROUTINES
  277.   _________________________________________________________________________________________________________
  278. }
  279.  
  280. TYPE
  281. {$IFC TYPED_FUNCTION_POINTERS}
  282.     DragSendDataProcPtr = FUNCTION(theType: FlavorType; dragSendRefCon: UNIV Ptr; theItemRef: ItemReference; theDrag: DragReference): OSErr;
  283. {$ELSEC}
  284.     DragSendDataProcPtr = ProcPtr;
  285. {$ENDC}
  286.  
  287. {$IFC TYPED_FUNCTION_POINTERS}
  288.     DragInputProcPtr = FUNCTION(VAR mouse: Point; VAR modifiers: SInt16; dragInputRefCon: UNIV Ptr; theDrag: DragReference): OSErr;
  289. {$ELSEC}
  290.     DragInputProcPtr = ProcPtr;
  291. {$ENDC}
  292.  
  293. {$IFC TYPED_FUNCTION_POINTERS}
  294.     DragDrawingProcPtr = FUNCTION(message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UNIV Ptr; theDrag: DragReference): OSErr;
  295. {$ELSEC}
  296.     DragDrawingProcPtr = ProcPtr;
  297. {$ENDC}
  298.  
  299.     DragSendDataUPP = UniversalProcPtr;
  300.     DragInputUPP = UniversalProcPtr;
  301.     DragDrawingUPP = UniversalProcPtr;
  302.  
  303. CONST
  304.     uppDragSendDataProcInfo = $00003FE0;
  305.     uppDragInputProcInfo = $00003FE0;
  306.     uppDragDrawingProcInfo = $000FFFA0;
  307.  
  308. FUNCTION NewDragSendDataProc(userRoutine: DragSendDataProcPtr): DragSendDataUPP;
  309.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  310.     INLINE $2E9F;
  311.     {$ENDC}
  312.  
  313. FUNCTION NewDragInputProc(userRoutine: DragInputProcPtr): DragInputUPP;
  314.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  315.     INLINE $2E9F;
  316.     {$ENDC}
  317.  
  318. FUNCTION NewDragDrawingProc(userRoutine: DragDrawingProcPtr): DragDrawingUPP;
  319.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  320.     INLINE $2E9F;
  321.     {$ENDC}
  322.  
  323. FUNCTION CallDragSendDataProc(theType: FlavorType; dragSendRefCon: UNIV Ptr; theItemRef: ItemReference; theDrag: DragReference; userRoutine: DragSendDataUPP): OSErr;
  324.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  325.     INLINE $205F, $4E90;
  326.     {$ENDC}
  327.  
  328. FUNCTION CallDragInputProc(VAR mouse: Point; VAR modifiers: SInt16; dragInputRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragInputUPP): OSErr;
  329.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  330.     INLINE $205F, $4E90;
  331.     {$ENDC}
  332.  
  333. FUNCTION CallDragDrawingProc(message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragDrawingUPP): OSErr;
  334.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  335.     INLINE $205F, $4E90;
  336.     {$ENDC}
  337. {
  338.   _________________________________________________________________________________________________________
  339.       
  340.    • INSTALLING AND REMOVING HANDLERS API'S
  341.   _________________________________________________________________________________________________________
  342. }
  343.  
  344. FUNCTION InstallTrackingHandler(trackingHandler: DragTrackingHandlerUPP; theWindow: WindowPtr; handlerRefCon: UNIV Ptr): OSErr;
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     INLINE $7001, $ABED;
  347.     {$ENDC}
  348. FUNCTION InstallReceiveHandler(receiveHandler: DragReceiveHandlerUPP; theWindow: WindowPtr; handlerRefCon: UNIV Ptr): OSErr;
  349.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  350.     INLINE $7002, $ABED;
  351.     {$ENDC}
  352. FUNCTION RemoveTrackingHandler(trackingHandler: DragTrackingHandlerUPP; theWindow: WindowPtr): OSErr;
  353.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  354.     INLINE $7003, $ABED;
  355.     {$ENDC}
  356. FUNCTION RemoveReceiveHandler(receiveHandler: DragReceiveHandlerUPP; theWindow: WindowPtr): OSErr;
  357.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  358.     INLINE $7004, $ABED;
  359.     {$ENDC}
  360. {
  361.   _________________________________________________________________________________________________________
  362.       
  363.    • CREATING & DISPOSING
  364.   _________________________________________________________________________________________________________
  365. }
  366.  
  367. FUNCTION NewDrag(VAR theDrag: DragReference): OSErr;
  368.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  369.     INLINE $7005, $ABED;
  370.     {$ENDC}
  371. FUNCTION DisposeDrag(theDrag: DragReference): OSErr;
  372.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  373.     INLINE $7006, $ABED;
  374.     {$ENDC}
  375. {
  376.   _________________________________________________________________________________________________________
  377.       
  378.    • ADDING DRAG ITEM FLAVORS
  379.   _________________________________________________________________________________________________________
  380. }
  381.  
  382. FUNCTION AddDragItemFlavor(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; dataSize: Size; theFlags: FlavorFlags): OSErr;
  383.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  384.     INLINE $7007, $ABED;
  385.     {$ENDC}
  386. FUNCTION SetDragItemFlavorData(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; dataSize: Size; dataOffset: UInt32): OSErr;
  387.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  388.     INLINE $7009, $ABED;
  389.     {$ENDC}
  390. {
  391.   _________________________________________________________________________________________________________
  392.       
  393.    • PROVIDING CALLBACK PROCEDURES
  394.   _________________________________________________________________________________________________________
  395. }
  396.  
  397. FUNCTION SetDragSendProc(theDrag: DragReference; sendProc: DragSendDataUPP; dragSendRefCon: UNIV Ptr): OSErr;
  398.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  399.     INLINE $700A, $ABED;
  400.     {$ENDC}
  401.  
  402. FUNCTION SetDragInputProc(theDrag: DragReference; inputProc: DragInputUPP; dragInputRefCon: UNIV Ptr): OSErr;
  403.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  404.     INLINE $700B, $ABED;
  405.     {$ENDC}
  406. FUNCTION SetDragDrawingProc(theDrag: DragReference; drawingProc: DragDrawingUPP; dragDrawingRefCon: UNIV Ptr): OSErr;
  407.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  408.     INLINE $700C, $ABED;
  409.     {$ENDC}
  410. {
  411.   _________________________________________________________________________________________________________
  412.       
  413.    • SETTING THE DRAG IMAGE
  414.   _________________________________________________________________________________________________________
  415. }
  416.  
  417. FUNCTION SetDragImage(theDrag: DragReference; imagePixMap: PixMapHandle; imageRgn: RgnHandle; imageOffsetPt: Point; theImageFlags: DragImageFlags): OSErr;
  418.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  419.     INLINE $7027, $ABED;
  420.     {$ENDC}
  421. {
  422.   _________________________________________________________________________________________________________
  423.       
  424.    • PERFORMING A DRAG
  425.   _________________________________________________________________________________________________________
  426. }
  427.  
  428. FUNCTION TrackDrag(theDrag: DragReference; {CONST}VAR theEvent: EventRecord; theRegion: RgnHandle): OSErr;
  429.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  430.     INLINE $700D, $ABED;
  431.     {$ENDC}
  432. {
  433.   _________________________________________________________________________________________________________
  434.       
  435.    • GETTING DRAG ITEM INFORMATION
  436.   _________________________________________________________________________________________________________
  437. }
  438.  
  439. FUNCTION CountDragItems(theDrag: DragReference; VAR numItems: UInt16): OSErr;
  440.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  441.     INLINE $700E, $ABED;
  442.     {$ENDC}
  443. FUNCTION GetDragItemReferenceNumber(theDrag: DragReference; index: UInt16; VAR theItemRef: ItemReference): OSErr;
  444.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  445.     INLINE $700F, $ABED;
  446.     {$ENDC}
  447. FUNCTION CountDragItemFlavors(theDrag: DragReference; theItemRef: ItemReference; VAR numFlavors: UInt16): OSErr;
  448.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  449.     INLINE $7010, $ABED;
  450.     {$ENDC}
  451. FUNCTION GetFlavorType(theDrag: DragReference; theItemRef: ItemReference; index: UInt16; VAR theType: FlavorType): OSErr;
  452.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  453.     INLINE $7011, $ABED;
  454.     {$ENDC}
  455. FUNCTION GetFlavorFlags(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; VAR theFlags: FlavorFlags): OSErr;
  456.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  457.     INLINE $7012, $ABED;
  458.     {$ENDC}
  459. FUNCTION GetFlavorDataSize(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; VAR dataSize: Size): OSErr;
  460.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  461.     INLINE $7013, $ABED;
  462.     {$ENDC}
  463. FUNCTION GetFlavorData(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; VAR dataSize: Size; dataOffset: UInt32): OSErr;
  464.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  465.     INLINE $7014, $ABED;
  466.     {$ENDC}
  467. {
  468.   _________________________________________________________________________________________________________
  469.       
  470.    • DRAG ITEM BOUNDS
  471.   _________________________________________________________________________________________________________
  472. }
  473.  
  474. FUNCTION GetDragItemBounds(theDrag: DragReference; theItemRef: ItemReference; VAR itemBounds: Rect): OSErr;
  475.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  476.     INLINE $7015, $ABED;
  477.     {$ENDC}
  478. FUNCTION SetDragItemBounds(theDrag: DragReference; theItemRef: ItemReference; {CONST}VAR itemBounds: Rect): OSErr;
  479.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  480.     INLINE $7016, $ABED;
  481.     {$ENDC}
  482. {
  483.   _________________________________________________________________________________________________________
  484.       
  485.    • DROP LOCATIONS
  486.   _________________________________________________________________________________________________________
  487. }
  488.  
  489. FUNCTION GetDropLocation(theDrag: DragReference; VAR dropLocation: AEDesc): OSErr;
  490.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  491.     INLINE $7017, $ABED;
  492.     {$ENDC}
  493. FUNCTION SetDropLocation(theDrag: DragReference; {CONST}VAR dropLocation: AEDesc): OSErr;
  494.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  495.     INLINE $7018, $ABED;
  496.     {$ENDC}
  497. {
  498.   _________________________________________________________________________________________________________
  499.       
  500.    • GETTING INFORMATION ABOUT A DRAG
  501.   _________________________________________________________________________________________________________
  502. }
  503.  
  504. FUNCTION GetDragAttributes(theDrag: DragReference; VAR flags: DragAttributes): OSErr;
  505.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  506.     INLINE $7019, $ABED;
  507.     {$ENDC}
  508. FUNCTION GetDragMouse(theDrag: DragReference; VAR mouse: Point; VAR globalPinnedMouse: Point): OSErr;
  509.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  510.     INLINE $701A, $ABED;
  511.     {$ENDC}
  512. FUNCTION SetDragMouse(theDrag: DragReference; globalPinnedMouse: Point): OSErr;
  513.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  514.     INLINE $701B, $ABED;
  515.     {$ENDC}
  516. FUNCTION GetDragOrigin(theDrag: DragReference; VAR globalInitialMouse: Point): OSErr;
  517.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  518.     INLINE $701C, $ABED;
  519.     {$ENDC}
  520. FUNCTION GetDragModifiers(theDrag: DragReference; VAR modifiers: SInt16; VAR mouseDownModifiers: SInt16; VAR mouseUpModifiers: SInt16): OSErr;
  521.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  522.     INLINE $701D, $ABED;
  523.     {$ENDC}
  524. {
  525.   _________________________________________________________________________________________________________
  526.       
  527.    • DRAG HIGHLIGHTING
  528.   _________________________________________________________________________________________________________
  529. }
  530.  
  531. FUNCTION ShowDragHilite(theDrag: DragReference; hiliteFrame: RgnHandle; inside: BOOLEAN): OSErr;
  532.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  533.     INLINE $701E, $ABED;
  534.     {$ENDC}
  535. FUNCTION HideDragHilite(theDrag: DragReference): OSErr;
  536.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  537.     INLINE $701F, $ABED;
  538.     {$ENDC}
  539. FUNCTION DragPreScroll(theDrag: DragReference; dH: SInt16; dV: SInt16): OSErr;
  540.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  541.     INLINE $7020, $ABED;
  542.     {$ENDC}
  543. FUNCTION DragPostScroll(theDrag: DragReference): OSErr;
  544.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  545.     INLINE $7021, $ABED;
  546.     {$ENDC}
  547. FUNCTION UpdateDragHilite(theDrag: DragReference; updateRgn: RgnHandle): OSErr;
  548.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  549.     INLINE $7022, $ABED;
  550.     {$ENDC}
  551. FUNCTION GetDragHiliteColor(window: WindowPtr; VAR color: RGBColor): OSErr;
  552.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  553.     INLINE $7026, $ABED;
  554.     {$ENDC}
  555.  
  556. {
  557.   _________________________________________________________________________________________________________
  558.       
  559.    • UTILITIES
  560.   _________________________________________________________________________________________________________
  561. }
  562.  
  563.  
  564. FUNCTION WaitMouseMoved(initialMouse: Point): BOOLEAN;
  565.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  566.     INLINE $7023, $ABED;
  567.     {$ENDC}
  568.  
  569. FUNCTION ZoomRects({CONST}VAR fromRect: Rect; {CONST}VAR toRect: Rect; zoomSteps: SInt16; acceleration: ZoomAcceleration): OSErr;
  570.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  571.     INLINE $7024, $ABED;
  572.     {$ENDC}
  573. FUNCTION ZoomRegion(region: RgnHandle; zoomDistance: Point; zoomSteps: SInt16; acceleration: ZoomAcceleration): OSErr;
  574.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  575.     INLINE $7025, $ABED;
  576.     {$ENDC}
  577.  
  578. {
  579.   _________________________________________________________________________________________________________
  580.    • OLD NAMES
  581.      These are provided for compatiblity with older source bases.  It is recommended to not use them since
  582.        they may removed from this interface file at any time.
  583.   _________________________________________________________________________________________________________
  584. }
  585.  
  586. {$IFC OLDROUTINENAMES }
  587.  
  588. CONST
  589.     dragHasLeftSenderWindow        = $00000001;                    {  drag has left the source window since TrackDrag  }
  590.     dragInsideSenderApplication    = $00000002;                    {  drag is occurring within the sender application  }
  591.     dragInsideSenderWindow        = $00000004;                    {  drag is occurring within the sender window  }
  592.  
  593.     dragTrackingEnterHandler    = 1;                            {  drag has entered handler  }
  594.     dragTrackingEnterWindow        = 2;                            {  drag has entered window  }
  595.     dragTrackingInWindow        = 3;                            {  drag is moving within window  }
  596.     dragTrackingLeaveWindow        = 4;                            {  drag has exited window  }
  597.     dragTrackingLeaveHandler    = 5;                            {  drag has exited handler  }
  598.  
  599.     dragRegionBegin                = 1;                            {  initialize drawing  }
  600.     dragRegionDraw                = 2;                            {  draw drag feedback  }
  601.     dragRegionHide                = 3;                            {  hide drag feedback  }
  602.     dragRegionIdle                = 4;                            {  drag feedback idle time  }
  603.     dragRegionEnd                = 5;                            {  end of drawing  }
  604.  
  605.     zoomNoAcceleration            = 0;                            {  use linear interpolation  }
  606.     zoomAccelerate                = 1;                            {  ramp up step size  }
  607.     zoomDecelerate                = 2;                            {  ramp down step size  }
  608.  
  609.     kDragStandardImage            = 0;                            {  65% image translucency (standard) }
  610.     kDragDarkImage                = 1;                            {  50% image translucency }
  611.     kDragDarkerImage            = 2;                            {  25% image translucency }
  612.     kDragOpaqueImage            = 3;                            {  0% image translucency (opaque) }
  613.  
  614. {$ENDC}  {OLDROUTINENAMES}
  615.  
  616. {$ALIGN RESET}
  617. {$POP}
  618.  
  619. {$SETC UsingIncludes := DragIncludes}
  620.  
  621. {$ENDC} {__DRAG__}
  622.  
  623. {$IFC NOT UsingIncludes}
  624.  END.
  625. {$ENDC}
  626.